package com.crm.jpaandthymeleaf.entity;

import javax.persistence.*;
import java.sql.Timestamp;
import java.util.Objects;

/**
 * @author 周敬
 * @version 1.0
 * @packageName com.crm.jpaandthymeleaf.entity
 * @fileName SalChance
 * @createTime 2021/12/15-20:19-星期三
 * @lastModify 2021/12/15-20:19-星期三
 */
@Entity
@Table(name = "sal_chance", schema = "crm", catalog = "")
public class SalChance {
    private long chcId;
    private String chcSource;
    private String chcCustName;
    private String chcTitle;
    private Integer chcRate;
    private String chcLinkman;
    private String chcTel;
    private String chcDesc;
    private Long chcCreateId;
    private String chcCreateBy;
    private Timestamp chcCreateDate;
    private Long chcDueId;
    private String chcDueTo;
    private Timestamp chcDueDate;
    private String chcStatus;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "chc_id")
    public long getChcId() {
        return chcId;
    }

    public void setChcId(long chcId) {
        this.chcId = chcId;
    }

    @Basic
    @Column(name = "chc_source")
    public String getChcSource() {
        return chcSource;
    }

    public void setChcSource(String chcSource) {
        this.chcSource = chcSource;
    }

    @Basic
    @Column(name = "chc_cust_name")
    public String getChcCustName() {
        return chcCustName;
    }

    public void setChcCustName(String chcCustName) {
        this.chcCustName = chcCustName;
    }

    @Basic
    @Column(name = "chc_title")
    public String getChcTitle() {
        return chcTitle;
    }

    public void setChcTitle(String chcTitle) {
        this.chcTitle = chcTitle;
    }

    @Basic
    @Column(name = "chc_rate")
    public Integer getChcRate() {
        return chcRate;
    }

    public void setChcRate(Integer chcRate) {
        this.chcRate = chcRate;
    }

    @Basic
    @Column(name = "chc_linkman")
    public String getChcLinkman() {
        return chcLinkman;
    }

    public void setChcLinkman(String chcLinkman) {
        this.chcLinkman = chcLinkman;
    }

    @Basic
    @Column(name = "chc_tel")
    public String getChcTel() {
        return chcTel;
    }

    public void setChcTel(String chcTel) {
        this.chcTel = chcTel;
    }

    @Basic
    @Column(name = "chc_desc")
    public String getChcDesc() {
        return chcDesc;
    }

    public void setChcDesc(String chcDesc) {
        this.chcDesc = chcDesc;
    }

    @Basic
    @Column(name = "chc_create_id")
    public Long getChcCreateId() {
        return chcCreateId;
    }

    public void setChcCreateId(Long chcCreateId) {
        this.chcCreateId = chcCreateId;
    }

    @Basic
    @Column(name = "chc_create_by")
    public String getChcCreateBy() {
        return chcCreateBy;
    }

    public void setChcCreateBy(String chcCreateBy) {
        this.chcCreateBy = chcCreateBy;
    }

    @Basic
    @Column(name = "chc_create_date")
    public Timestamp getChcCreateDate() {
        return chcCreateDate;
    }

    public void setChcCreateDate(Timestamp chcCreateDate) {
        this.chcCreateDate = chcCreateDate;
    }

    @Basic
    @Column(name = "chc_due_id")
    public Long getChcDueId() {
        return chcDueId;
    }

    public void setChcDueId(Long chcDueId) {
        this.chcDueId = chcDueId;
    }

    @Basic
    @Column(name = "chc_due_to")
    public String getChcDueTo() {
        return chcDueTo;
    }

    public void setChcDueTo(String chcDueTo) {
        this.chcDueTo = chcDueTo;
    }

    @Basic
    @Column(name = "chc_due_date")
    public Timestamp getChcDueDate() {
        return chcDueDate;
    }

    public void setChcDueDate(Timestamp chcDueDate) {
        this.chcDueDate = chcDueDate;
    }

    @Basic
    @Column(name = "chc_status")
    public String getChcStatus() {
        return chcStatus;
    }

    public void setChcStatus(String chcStatus) {
        this.chcStatus = chcStatus;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        SalChance salChance = (SalChance) o;
        return chcId == salChance.chcId && Objects.equals(chcSource, salChance.chcSource) && Objects.equals(chcCustName, salChance.chcCustName) && Objects.equals(chcTitle, salChance.chcTitle) && Objects.equals(chcRate, salChance.chcRate) && Objects.equals(chcLinkman, salChance.chcLinkman) && Objects.equals(chcTel, salChance.chcTel) && Objects.equals(chcDesc, salChance.chcDesc) && Objects.equals(chcCreateId, salChance.chcCreateId) && Objects.equals(chcCreateBy, salChance.chcCreateBy) && Objects.equals(chcCreateDate, salChance.chcCreateDate) && Objects.equals(chcDueId, salChance.chcDueId) && Objects.equals(chcDueTo, salChance.chcDueTo) && Objects.equals(chcDueDate, salChance.chcDueDate) && Objects.equals(chcStatus, salChance.chcStatus);
    }

    @Override
    public int hashCode() {
        return Objects.hash(chcId, chcSource, chcCustName, chcTitle, chcRate, chcLinkman, chcTel, chcDesc, chcCreateId, chcCreateBy, chcCreateDate, chcDueId, chcDueTo, chcDueDate, chcStatus);
    }
}
